package com.maegul.data.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * The persistent class for the media_sources database table.
 * 
 */
@Entity
@Table(name="media_sources")
public class MediaSource extends AbstractEntity {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int id;

	@Column(name="mime_type")
	private String mimeType;

	private String src;

	//bi-directional many-to-one association to MediaItem
    @ManyToOne
	@JoinColumn(name="media_item", referencedColumnName="name")
	private MediaItem mediaItemBean;

    public MediaSource() {
    }

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getMimeType() {
		return this.mimeType;
	}

	public void setMimeType(String mimeType) {
		this.mimeType = mimeType;
	}

	public String getSrc() {
		return this.src;
	}

	public void setSrc(String src) {
		this.src = src;
	}

	public MediaItem getMediaItemBean() {
		return this.mediaItemBean;
	}

	public void setMediaItemBean(MediaItem mediaItemBean) {
		this.mediaItemBean = mediaItemBean;
	}
	
}